<template>
  <el-dialog
    class="dialog"
    :visible.sync="showArticle"
    width="800px"
    v-if="showArticle"
    @click="showArticle = false">
    <div slot="title">
        <h2 class="flex-justify-center mb16">{{info.title}}</h2>
        <p class="flex-justify-bcenter pr16 pl16"> <span >发布人：系统</span> <span class="pl16">发布时间：{{info.created_at}}</span> </p>
    </div>
    <div class="f-16 c-black">{{info.content}}</div>
    <!-- <div slot="footer" v-if="info.attachments && info.attachments.length > 0" style="textAlign:left">
        <h3 class="mb8">附件：</h3>
        <div v-for="item in info.attachments" :key='item.id'>
            <p><span @click="upload(item.file_path,item.filename)" class="c-blue shou">{{item.filename}}</span> </p>
        </div>
    </div> -->
  </el-dialog>
</template>

<script>
import {uploadUrl} from '@/api/request'
import {ApiupLoadFiles} from '@/api'
export default {
    props: {
        info:{
            default:()=>({employee:{}}),
            type: Object,
        }
    },
    data(){
        return{
            showArticle: false,
            uploadUrl,
        }
    },
    // methods:{
    //     upload(url,name){
    //         ApiupLoadFiles(url).then(res => {
    //             let a = document.createElement("a")
    //             a.href = URL.createObjectURL(res)
    //             a.download = name
    //             a.click()
    //             URL.revokeObjectURL(a.href)
    //         })
    //     }
    // }
};
</script>

<style lang='less' scoped>
 /deep/.el-dialog__body{
    min-height: 200px;
}
</style>